<%@ page language="java" import="java.util.*, orm.TeachingPlanBaseInfo, util.Utility" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <TITLE>听力语言康复教学教师备课系统</TITLE>
    
	<meta http-equiv=Content-Type content="text/html; charset=utf-8">
	<meta content="MSHTML 6.00.6000.16705" name=GENERATOR>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
	<link href="reference/images/Beike.css" rel="stylesheet" type="text/css">
	<script src="<%=request.getContextPath() %>/reference/WebCalendar.js" type="text/javascript"></script>
  </head>
  	<%
	if (request.getAttribute("flag") != null) {
	%>
	<script language="javascript">
	window.alert('该教案已经存在于“我收藏的教案”中。')
	</script>
	<%
	}
	%>
  <script language="Javascript">
  	function collectRedirect(hdTPID, constitutor)
	{
		form1.action="TPManagement/AllTeachingPlanFunction?func=collect&hdTPID="+hdTPID+"&constitutor"+constitutor;
	}
	function editRedirect(hdTPID)
	{
		form1.action="TPManagement/AllTeachingPlanFunction?func=edit&hdTPID="+hdTPID;
	}
	
	function StartPage(){
		form1.action="TPManagement/AllTeachingPlanFunction?func=paging&sub=start";
	}
	
	function PreviousPage() {
		form1.action="TPManagement/AllTeachingPlanFunction?func=paging&sub=front";
	}
	function NextPage() {
		form1.action="TPManagement/AllTeachingPlanFunction?func=paging&sub=next";
	}
	function LastPage() {
		form1.action="TPManagement/AllTeachingPlanFunction?func=paging&sub=last";
	}
	function SearchPage() {
		form1.action="TPManagement/AllTeachingPlanFunction?func=searchPage";
	}
	function SearchCondition() {
		form1.action="TPManagement/AllTeachingPlanFunction?func=SearchCondition";
	}
  </script>
  <body>
    <form name="form1" method="post" action="">
  	<input type="hidden" id="HDPageNo" name="HDPageNo" value=<%=request.getAttribute("pageNo") %>> 
	<input type="hidden" id="HDtotalPage" name="HDtotalPage" value=<%=request.getAttribute("totalPage") %>> 
  	<table width="95%" border="0" align="center" cellpadding="0" cellspacing="1" bordercolor="#FFFFFF" bgcolor="#A4C9EC">
	    <tr>
	      <td><table width="100%" border="0" align="center" cellpadding="5" cellspacing="0">
	        <tr>
	          <td width="20%" align="right" valign="middle" bgcolor="#FFFFFF">教案类别：</td>
	          <td width="20%" valign="middle" bgcolor="#FFFFFF">
	          	<select name="TPType" class="boxCopy" id="select5" style="width:100%; height:19px;">
	          		<option value="">全部</option>
			        <option value="1" <c:if test="${param.TPType==1}">selected</c:if>>个别教案</option>
			        <option value="2" <c:if test="${param.TPType==2}">selected</c:if>>集体教案</option>
		        </select>
	          </td>
	          <td width="20%" align="right" valign="middle" bgcolor="#FFFFFF">教案属性：</td>
	          <td width="20%" valign="middle" bgcolor="#FFFFFF">
	          	<select name="TPProperty" class="boxCopy" id="select5" style="width:100%; height:19px;">
			        <option value="">全部</option>
			        <option value="1" <c:if test="${param.TPProperty==1}">selected</c:if>>标准教案</option>
			        <option value="2" <c:if test="${param.TPProperty==2}">selected</c:if>>自定义教案</option>
		        </select>
	          </td>
	          <td width="20%" align="right" valign="middle" bgcolor="#FFFFFF">适用年龄：</td>
	          <td width="20%" valign="middle" bgcolor="#FFFFFF">
	          	<select name="AppropriateAge" class="boxCopy" id="select5" style="width:100%; height:19px;">
	          		<option value="">全部</option>
		        	<option value="1" <c:if test="${param.AppropriateAge==1}">selected</c:if>>0～1</option>
		        	<option value="2" <c:if test="${param.AppropriateAge==2}">selected</c:if>>1～2</option>
		        	<option value="3" <c:if test="${param.AppropriateAge==3}">selected</c:if>>2～3</option>
		        	<option value="4" <c:if test="${param.AppropriateAge==4}">selected</c:if>>3～4</option>
		        	<option value="5" <c:if test="${param.AppropriateAge==5}">selected</c:if>>4～5</option>
		        	<option value="6" <c:if test="${param.AppropriateAge==6}">selected</c:if>>5～6</option>
		        </select>
	          </td>
	         </tr>
	         <tr>
	          <td width="17%" align="right" valign="middle" bgcolor="#FFFFFF">月主题教学名称：</td>
	          <td width="20%" valign="middle" bgcolor="#FFFFFF">
	          	<input name="MonthThemeName" type="text" class="boxCopy" id="MonthThemeName" value="<c:out value="${param.MonthThemeName}"/>" style="width:100px; height:19px;">
	          </td>
	        
	          <td width="17%" align="right" valign="middle" bgcolor="#FFFFFF">周主题教学名称：</td>
	          <td width="20%" valign="middle" bgcolor="#FFFFFF">
	          	<input name="WeekThemeName" type="text" class="boxCopy" id="WeekThemeName" value="<c:out value="${param.WeekThemeName}"/>" style="width:100px; height:19px;">
	          </td>
	          <td width="17%" align="right" valign="middle" bgcolor="#FFFFFF">发展领域：</td>
	          <td width="20%" valign="middle" bgcolor="#FFFFFF">
	          	<select name="DevelopmentDomain" class="boxCopy" id="select5" style="width:100%; height:19px;">
			        <option value="">全部</option>
			        <option value="1" <c:if test="${param.DevelopmentDomain==1}">selected</c:if>>健康</option>
	                <option value="2" <c:if test="${param.DevelopmentDomain==2}">selected</c:if>>语言</option>
	                <option value="3" <c:if test="${param.DevelopmentDomain==3}">selected</c:if>>科学</option>
	                <option value="4" <c:if test="${param.DevelopmentDomain==4}">selected</c:if>>艺术</option>
	                <option value="5" <c:if test="${param.DevelopmentDomain==5}">selected</c:if>>社会</option>
		        </select>
	          </td>
	         </tr>
	         <tr>
	          <td width="17%" align="right" valign="middle" bgcolor="#FFFFFF">强化领域：</td>
	          <td width="20%" valign="middle" bgcolor="#FFFFFF">
		        <select name="AggrandizementDomain" class="boxCopy" id="sltAggrandizementDomain" style="width:100%; height:19px;">
					<option value="">全部</option>
			        <option value="1" <c:if test="${param.AggrandizementDomain==1}">selected</c:if>>听觉训练</option>
	                <option value="2" <c:if test="${param.AggrandizementDomain==2}">selected</c:if>>发音练习</option>
	                <option value="3" <c:if test="${param.AggrandizementDomain==3}">selected</c:if>>语言学习</option>
	                <option value="4" <c:if test="${param.AggrandizementDomain==4}">selected</c:if>>交际训练</option>
	                <option value="5" <c:if test="${param.AggrandizementDomain==5}">selected</c:if>>认知强化</option>
	                <option value="6" <c:if test="${param.AggrandizementDomain==6}">selected</c:if>>言语矫治</option>
	                <option value="7" <c:if test="${param.AggrandizementDomain==7}">selected</c:if>>其他</option>
				</select>
		        
	          </td>
	          <td width="17%" align="right" valign="middle" bgcolor="#FFFFFF">活动类别：</td>
	          <td width="20%" valign="middle" bgcolor="#FFFFFF">
	          	<select name="ActivityType" class="boxCopy" id="select5" style="width:100%; height:19px;">
		        	<option value="">全部</option>
			        <option value="1" <c:if test="${param.ActivityType==1}">selected</c:if>>准备性</option>
	                <option value="2" <c:if test="${param.ActivityType==2}">selected</c:if>>解决性</option>
	                <option value="3" <c:if test="${param.ActivityType==3}">selected</c:if>>延伸性</option>
	                <option value="4" <c:if test="${param.ActivityType==4}">selected</c:if>>总结性</option>
		        </select>
	          </td>
	         
	          <td width="17%" align="right" valign="middle" bgcolor="#FFFFFF">撰写人：</td>
	          <td width="20%" valign="middle" bgcolor="#FFFFFF">
	          	<input name="Constitutor" type="text" class="boxCopy" id="Constitutor" value="<c:out value="${param.Constitutor}"/>" style="width:100px; height:19px;">
	          </td>
	          </tr>
	         <tr>
	          <td width="17%" align="right" valign="middle" bgcolor="#FFFFFF">教案制定年度：</td>
	          <td width="20%" valign="middle" bgcolor="#FFFFFF">
	          	<input value="<c:out value="${param.TPYear}"/>" class="boxCopy" onClick="SelectDate(this,'yyyy')" style="width:100px; height:19px;" type="text" readonly name="TPYear" id="TPYear" size="12"/>年
	          </td>
	          <td width="20%" valign="middle" bgcolor="#FFFFFF"></td>
	          <td width="20%" valign="middle" bgcolor="#FFFFFF"></td>
	          <td width="20%" valign="middle" bgcolor="#FFFFFF"></td>
	          <td  valign="right" bgcolor="#FFFFFF">
	          	
	          	<input type="image" height="20" width="44" border="0" onclick="SearchCondition()" src="reference/images/button_see.gif" name="btnJump" />
	          </td>
	           
	        </tr>
	      </table></td>
	    </tr>
	</table>
  
  <table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
      <td width="7"><img src="reference/images/table_1_01.gif" width="7" height="38"></td>
      <td background="reference/images/table_1_05.gif"><table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td width="30"><img src="reference/images/table_1_02.gif" width="30" height="38"></td>
          <td width="200" background="reference/images/table_1_03.gif"><b>所 有 教 案 信 息 管 理</b></td>
          <td width="59"><img src="reference/images/table_1_04.gif" width="59" height="38"></td>
          <td>&nbsp;</td>
        </tr>
      </table></td>
      <td width="7"><img src="reference/images/table_1_06.gif" width="8" height="38"></td>
    </tr>
    <tr>
      <td width="7" background="reference/images/table_1_07.gif">&nbsp;</td>
      <td bgcolor="#f7fbff"><table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#cfe5f5">
        <tr>
          <td width="35%" align="center" bgcolor="#a4c9ec"><B>教案主题</B></td>
          <td width="20%" height="25" align="center" bgcolor="#a4c9ec"><B>撰写人</B></td>
          <td width="10%" height="25" align="center" bgcolor="#a4c9ec"><B>模板次数</B></td>
          <td width="15%" height="25" align="center" bgcolor="#a4c9ec"><B><strong>类别</strong></B></td>
          <td width="10%" align="center" bgcolor="#a4c9ec"><b>收藏</b></td>
          <td width="10%" height="25" align="center" bgcolor="#a4c9ec"><b>编辑</b></td>
        </tr>
        <%
       	ArrayList<TeachingPlanBaseInfo> al = (ArrayList<TeachingPlanBaseInfo>) request.getAttribute("TPList");
       	for (int i = 0; i < al.size(); i++) {
       		String tpID= al.get(i).getTpID();
       	%>
       	<tr>
			<td width="35%" height="30" align="center" bgcolor="#FFFFFF"><%=al.get(i).getActivityName() %></td>
	        <td width="20%" height="30" align="center" bgcolor="#FFFFFF"><%=al.get(i).getTeacherName() %></td>
	        <td width="10%" height="30" align="center" bgcolor="#FFFFFF"><%=al.get(i).getEditingTimes() %></td>
	        <%
			if (al.get(i).getTpType() == Utility.TEACHINGPLAN_TYPE_INDIVIDUAL) {
	        %>
	        <td width="15%" height="30" align="center" bgcolor="#FFFFFF">个别教案</td>
	        <%
	        } else {
	        %>
			<td width="15%" height="30" align="center" bgcolor="#FFFFFF">集体教案</td>
	        <% 
	        }
	        %>
	        <td width="10%" align="center" bgcolor="#FFFFFF">
	        	
	        	<input onclick="collectRedirect('<%=tpID %>','<%=al.get(i).getTeacherName() %>')" type="image" height=20 alt=收藏 src="reference/images/shoucang.gif" width=20 border=0>
            </td>
          	<td width="10%" height="30" align="center" bgcolor="#FFFFFF">
          		<input onclick="editRedirect('<%=tpID %>')" type="image" src="reference/images/bianji.gif" alt="" width="16" height="16" border="0">
          	</td>
	        
		</tr>
       		<%
        	}
         %>
      </table>
        <table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#FFFFFF">
          <tr>
            <td bgcolor="#e6f0f8"><table width="100%" border="0" cellspacing="0" cellpadding="3">
              <tr>
                <td width="70%" align="right"><%=request.getAttribute("pageNo") %>
                <FONT color=#c0c0c0>/<%=request.getAttribute("totalPage") %>页 &nbsp;
                	<input name="btnStart" type="submit" value="首页 &nbsp;" onclick="StartPage()">
	                      <input name="btnFront"  id="btnFront" type="submit" value="前页 &nbsp;" onclick="PreviousPage()">
	                      <input name="btnNext" id="btnNext" type="submit" value="后页 &nbsp;" onclick="NextPage()">
	                      <input name="btnLast" id="btnLast" type="submit" value="尾页 &nbsp;" onclick="LastPage()"> 
                      </font>第
                        <input class="boxCopy" maxlength="5" value="<%=request.getAttribute("pageNo") %>" size="5" name="PageNo" id="PageNo"/>
                        页</td>
                      <td align="right" width="20">
                      	<input type="image" height="16" width="18" onclick="SearchPage()" src="reference/images/button_go.gif" name="btnJump" />
            		</td>
              </tr>
            </table></td>
          </tr>
        </table></td>
      <td width="7" background="reference/images/table_1_09.gif">&nbsp;</td>
    </tr>
    <tr>
      <td width="7"><img src="reference/images/table_1_10.gif" width="7" height="22"></td>
      <td background="reference/images/table_1_11.gif">&nbsp;</td>
      <td width="7"><img src="reference/images/table_1_12.gif" width="8" height="22"></td>
    </tr>
  </table>
</form>
  </body>
</html>
	<script language="javascript">
		if (document.getElementById("HDPageNo").value == 1) {
			document.getElementById("btnFront").disabled = 'true';
		} 
		
		if (document.getElementById("HDPageNo").value == <%=request.getAttribute("totalPage") %>) {
			document.getElementById("btnNext").disabled = 'true';
		}
		if (document.getElementById("PageNo").value > <%=request.getAttribute("totalPage") %> && <%=request.getAttribute("totalPage") %> != 0 || document.getElementById("PageNo").value < 1) {
			alert("超出合理页面范围，请重新填写");
			
		}
		
	</script>
